package cn.com.api.mapper.base;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.*;

import cn.com.api.entity.ApiT_juan_tj;

//DAO
public interface T_juan_tjMapperBase {

	//根据id查看
    @Select("SELECT * FROM t_juan_tj  WHERE id = #{id}")
	public ApiT_juan_tj findT_juan_tjById(Integer id);
	
    //查看数据集
    @Select("SELECT * FROM T_juan_tj")
	public List<ApiT_juan_tj> findT_juan_tjs();
	
	//添加
    @Insert("INSERT INTO t_juan_tj (uid, juanid, enable, count, using_time, qr_code, is_used) VALUES (#{uid}, #{juanid}, #{enable}, #{count}, #{using_time}, #{qr_code}, #{is_used})")
 	@Options(useGeneratedKeys = true, keyProperty = "id")
    public int insertT_juan_tj(ApiT_juan_tj t_juan_tj);
  	
	//修改
    @Update("UPDATE t_juan_tj SET uid = #{uid}, juanid = #{juanid}, enable = #{enable}, count=#{count}, using_time = #{using_time}, qr_code = #{qr_code}, is_used = #{is_used} WHERE id = #{id}")
    public int updateT_juan_tj(ApiT_juan_tj t_juan_tj);
    
    //删除
    @Delete("DELETE FROM t_juan_tj  WHERE id = #{id}")
    public int deleteT_juan_tj(Integer id);
 
    // Foreign keys revelant		
		

	//region Indexs revelant
    
    
    
}


